package com.ruoyi.web.erp.controller;

import com.czkt.domain.ErpOrder;
import com.czkt.service.IErpOrderService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author lqm
 * @ClassName SalesController
 * @description: TODO
 */
@RestController
@RequestMapping("/system/sales")
public class SalesController extends BaseController {

    @Autowired
    IErpOrderService orderService;


    /**
     * 获取订单列表
     */
    @PreAuthorize("@ss.hasPermi('system:sales:list')")
    @GetMapping("/list")
    public TableDataInfo list(ErpOrder order) {
        startPage();
        List<ErpOrder> list = orderService.selectErpOrderList(order);
        return getDataTable(list);
    }

}
